/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.logiclander.whozwho.data.dao.hibernate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


/**
 *
 * @author logiclander
 */
@Entity
@Table( name = "CAPABILITIES" )
public class Capability {
//may end up being synonymous with operation named capability where applied to show ability like in application
//operation
//resource-scope (maybe here, maybe in operation object)

  private long sid;
  private Application application;
  private Operation operation;
  private boolean activeIndicator;

  @Id
  @GeneratedValue(generator = "increment")
  @GenericGenerator(name = "increment", strategy = "increment")
  @Column(name = "capability_sid", nullable = false)
  public Long getSid() {
    return sid;
  }

  public void setSid(long sid) {
    this.sid = sid;
  }

  @ManyToOne
  @JoinColumn(name="application_sid")
  public Application getApplication() {
    return application;
  }

  public void setApplication(Application application) {
	  this.application = application;
  }

  @ManyToOne
  @JoinColumn(name="operaion_sid")
  public Operation getOperation() {
    return operation;
  }

  public void setOperation(Operation operation) {
	  this.operation = operation;
  }

  @Column(name = "active_indicator", nullable = false)
  public boolean getActiveIndicator() {
    return activeIndicator;
  }

  public void setActiveIndicator(boolean activeIndicator) {
    this.activeIndicator = activeIndicator;
  }

}
